# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=zim-tools
pkgver=1.2.1
pkgrel=0
pkgdesc="Various ZIM command line tools"
url="https://github.com/openzim/zim-tools"
arch="all !mips !mips64" # blocked by libzim-dev
license="GPL-3.0-or-later"
options="!check" # No test suite from upstream
makedepends="meson libzim-dev"
subpackages="$pkgname-doc"
source="zim-tools-$pkgver.tar.gz::https://github.com/openzim/zim-tools/archive/$pkgver.tar.gz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

package() {
	DESTDIR="$pkgdir" ninja -C output install

	install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}

sha512sums="9658e706df18f01bdbd76580a6889009d107afff1c50d3c349f616b41cc11dbe886a53e3ddf6cab1dea6033483cc8c21774dbac40cb560450829f46dbca63c4c  zim-tools-1.2.1.tar.gz"
